gtk-demo: Fixes for the sliding puzzle
authorMatthias Clasen <mclasen@redhat.com>
Sun, 31 May 2020 15:02:36 +0000 (11:02 -0400)
committerMatthias Clasen <mclasen@redhat.com>
Sun, 31 May 2020 17:01:17 +0000 (13:01 -0400)
We were calling check_solved only for key presses,
meaning you could never solve the puzzle with the
mouse.

demos/gtk-demo/sliding_puzzle.c

index a6605514ebd0cc10601a29aed738df140d9a372b..3f1a7c30927eebd61f85f4caaca19b2fb7451d11 100644 (file)
@@ -251,6 +251,8 @@ puzzle_button_pressed (GtkGestureClick *gesture,
     {
       gtk_widget_error_bell (grid);
     }
+
+  check_solved (grid);
 }
 
 static void